const userRouter = require('@/routes/user.route')
const articleRouter = require('@/routes/article.route')
const articleCommentRouter = require('@/routes/article_comment.route')
const shareCircleRouter = require('@/routes/share_circle.router')
const unitRouter = require('@/routes/unit.route')
const dynamicsRouter = require('@/routes/dynamics.route')
const browseHistoryRouter = require('@/routes/browse_history.route')
const messageRouter = require('@/routes/message.route')
const feedbackRouter = require('@/routes/feedback.route')
const statisticsRouter = require('@/routes/statistics.route')
const shareCircleCommentRouter = require('@/routes/sharecircle_comment.route')
const siteFolderRouter = require('@/routes/site_folder.route')
const sitesRouter = require('@/routes/sites.route')
const tagRouter = require('@/routes/tag.route')
const loginLogRouter = require('@/routes/login_log.route')
const configRouter = require('@/routes/config.route')
const imRouter = require('@/routes/im.route')
const resumeRouter = require('@/routes/resume.route')
const tutorialRouter = require('@/routes/tutorial.route')
const questionRouter = require('@/routes/question.route')

function routerInstall (app) {
  app.use('/gimishare/api/v1/users', userRouter)
  app.use('/gimishare/api/v1/articles', articleRouter)
  app.use('/gimishare/api/v1/article/comments', articleCommentRouter)
  app.use('/gimishare/api/v1/shares', shareCircleRouter)
  app.use('/gimishare/api/v1/unit', unitRouter)
  app.use('/gimishare/api/v1/dynamics', dynamicsRouter)
  app.use('/gimishare/api/v1/messages', messageRouter)
  app.use('/gimishare/api/v1/history', browseHistoryRouter)
  app.use('/gimishare/api/v1/feedbacks', feedbackRouter)
  app.use('/gimishare/api/v1/statistics', statisticsRouter)
  app.use('/gimishare/api/v1/sharecircle/comments', shareCircleCommentRouter)
  app.use('/gimishare/api/v1/site/folder', siteFolderRouter)
  app.use('/gimishare/api/v1/sites', sitesRouter)
  app.use('/gimishare/api/v1/tag', tagRouter)
  app.use('/gimishare/api/v1/log', loginLogRouter)
  app.use('/gimishare/api/v1/config', configRouter)
  app.use('/gimishare/api/v1/im', imRouter)
  app.use('/gimishare/api/v1/resume', resumeRouter)
  app.use('/gimishare/api/v1/tutorial', tutorialRouter)
  app.use('/gimishare/api/v1/question', questionRouter)
}

module.exports = routerInstall
